<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <link rel="stylesheet" href="stylesheets/screen.css" type="text/css" media="screen" />
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>
      Ruby OAuth GEM
  </title>
  <script src="javascripts/rounded_corners_lite.inc.js" type="text/javascript"></script>
<style>

</style>
  <script type="text/javascript">
    window.onload = function() {
      settings = {
          tl: { radius: 10 },
          tr: { radius: 10 },
          bl: { radius: 10 },
          br: { radius: 10 },
          antiAlias: true,
          autoPad: true,
          validTags: ["div"]
      }
      var versionBox = new curvyCorners(settings, document.getElementById("version"));
      versionBox.applyCornersToAll();
    }
  </script>
</head>
<body>
<div id="main">

    <h1>Ruby OAuth GEM</h1>
    <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/oauth"; return false'>
      <p>Get Version</p>
      <a href="http://rubyforge.org/projects/oauth" class="numbers">0.1.1</a>
    </div>
    <h2>What</h2>


	<p>This is a RubyGem for implementing both OAuth clients and servers in Ruby applications.</p>


	<p>See the <a href="http://oauth.googlecode.com/svn/spec/branches/1.0/drafts/7/spec.html">OAuth specs</a></p>


	<h2>Installing</h2>


	<p><pre class='syntax'><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="ident">oauth</span></pre></p>


	<h2>The basics</h2>


	<p>This is a ruby library which is intended to be used in creating Ruby Consumer and Service Provider applications. It is <span class="caps">NOT</span> a Rails plugin, but could easily be used for the foundation for such a Rails plugin.</p>


	<p>As a matter of fact it has been pulled out from an <a href="http://code.google.com/p/oauth-plugin/">OAuth Rails Plugin</a> which in the future will require this <span class="caps">GEM</span>.</p>


	<h2>Demonstration of usage</h2>


	<p>Create a new consumer instance by passing it a configuration hash:</p>


<pre><code>@consumer=OAuth::Consumer.new( {
    :consumer_key=&gt;"key",
    :consumer_secret=&gt;"secret",
    :site=&gt;"https://agree2" 
    })</code></pre>

	<p>Start the process by requesting a token</p>


<pre><code>@request_token=@consumer.get_request_token
session[:request_token]=@request_token
redirect_to @request_token.authorize_url</code></pre>

	<p>When user returns create an access_token</p>


<pre><code>@access_token=@request_token.get_access_token
@photos=@access_token.get('/photos.xml')</code></pre>

	<h2>Documentation Wiki</h2>


	<p>There is some documentation on the Google Code project for the <a href="http://code.google.com/p/oauth-plugin/">OAuth Rails Plugin</a> :</p>


	<ul>
	<li><a href="http://code.google.com/p/oauth-plugin/wiki/RequestToken">RequestToken</a></li>
		<li><a href="http://code.google.com/p/oauth-plugin/wiki/AccessToken">AccessToken</a></li>
	</ul>


	<h2>Forum</h2>


	<p><a href="http://groups.google.com/group/oauth-ruby">http://groups.google.com/group/oauth-ruby</a></p>


	<h2>How to submit patches</h2>


	<p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people&#8217;s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p>


	<p>The trunk repository is <code>svn://rubyforge.org/var/svn/oauth/trunk</code> for anonymous access.</p>


	<h2>License</h2>


	<p>This code is free to use under the terms of the <span class="caps">MIT</span> license.</p>


	<h2>Contact</h2>


	<p>Comments are welcome. Send an email to <a href="mailto:pelleb@gmail.com">Pelle Braendgaard</a> email via the <a href="http://groups.google.com/group/oauth">forum</a></p>
    <p class="coda">
      <a href="FIXME email">FIXME full name</a>, 26th November 2007<br>
      Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
    </p>
</div>

<!-- insert site tracking codes here, like Google Urchin -->

</body>
</html>
